package day08;

import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;

public class Demo03 {

	public static void main(String[] args) throws Exception {

		FileOutputStream fos = new FileOutputStream("abc/osw.txt");
		BufferedOutputStream bos = new BufferedOutputStream(fos);
		OutputStreamWriter osw = new OutputStreamWriter(bos,"UTF-8");

		osw.write(30000);
		//将30000（田）编码为UTF-8<占3个字节>的byte数据，再将byte写进文件中。
		osw.write("田");
		osw.write("30000");
		
		osw.close();
		
		
		
		
		
	}

}
